package com.xmy.cultivate.feign.physics_outside;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xmy.cultivate.entity.views.ChaPlan;
import com.xmy.cultivate.entity.views.EduTask;
import com.xmy.cultivate.entity.views.MathChaPlan;
import com.xmy.cultivate.entity.views.PassRadeViews;
import com.xmy.cultivate.respons.PlanShutNum;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@FeignClient(value = "physics-outside")
public interface IPhysicsFeignClient {

    @GetMapping("/api/outside/chaPlan/getPassRadeDetailForStudentId")
    public List<MathChaPlan> getPassRadeDetailForStudentId(
            @RequestParam(value = "yearPart", required = false) String yearPart,
            @RequestParam(value = "quarterNum", required = false) String quarterNum,
            @RequestParam(value = "studentId", required = false) String studentId,
            @RequestParam(value = "subjectsId", required = false) String subjectsId,
            @RequestParam(value = "yetLessonNumStr", required = false) String yetLessonNumStr
    );

    @RequestMapping(value = "/api/outside/chaPlan/getNeedOrder", method = RequestMethod.GET)
    public Map<String,Object> getNeedOrder(@RequestParam(value = "pageNum", defaultValue = "1", required = false) Integer pageNum,
                                           @RequestParam(value = "pageSize", defaultValue = "10", required = false) Integer pageSize,
                                           @RequestParam("yearPart") Integer yearPart,
                                           @RequestParam("quarterNum") Integer quarterNum,
                                           @RequestParam("schoolId") Long schoolId,
                                           @RequestParam("lessonType") Integer lessonType,
                                           @RequestParam("subjectsId") Long subjectsId,
                                           @RequestParam("yearClassId") Integer yearClassId,
                                           @RequestParam("classTypeId") Long classTypeId,
                                           @RequestParam(value = "goodsTypeId",required = false,defaultValue = "2") Long goodsTypeId);

    @ApiOperation("获取课次列表")
    @RequestMapping(value = "/api/outside/eduTask/getTaskNumber",method= RequestMethod.POST)
    public List<EduTask> getTaskNumber(@RequestBody Map<String, Object> reMap);

    @ApiOperation("关联课次，拿学习数量与第几课次")
    @RequestMapping(value = "/api/outside/eduTask/getTaskList",method= RequestMethod.POST)
    public List<EduTask> getTaskList(@RequestBody Map<String, Object> reMap);

    @ApiOperation("未完成计划")
    @RequestMapping(value = "/api/outside/chaPlan/getChaPlanList",method= RequestMethod.POST)
    public List<ChaPlan> getChaPlanList(@RequestBody Map<String, Object> reMap);

    @ApiOperation("已完成计划")
    @RequestMapping(value = "/api/outside/chaPlan/getChaPlanListYes",method= RequestMethod.POST)
    public List<ChaPlan> getChaPlanListYes(@RequestBody Map<String, Object> reMap);

    @ApiOperation("保存计划")
    @RequestMapping(value = "/api/outside/chaPlan/saveChaPlan",method= RequestMethod.POST)
    public Boolean saveChaPlan(@RequestBody ChaPlan chaPlan);

    @ApiOperation("通关率-查询期间为当前周一至周日")
    @RequestMapping(value = "/api/outside/chaPlan/getClearanceRateChaPlan",method= RequestMethod.POST)
    public ChaPlan getClearanceRateChaPlan(@RequestBody PlanShutNum planShutNum);

    /**
     *
     * @return
     */
    @GetMapping("/api/outside/chaPlan/getChaPanAddList")
    public Page<MathChaPlan> getChaPanAddList(
            @RequestParam(value = "pageNum",defaultValue = "1") Integer pageNum,
            @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
            @RequestParam(value = "schoolIdStr",required = false) String schoolIdStr,
            @RequestParam(value = "yearPart",required = false) String yearPart,
            @RequestParam(value = "quarterNum",required = false) String quarterNum,
            @RequestParam(value = "teacherId",required = false) String teacherId,
            @RequestParam(value = "gradeId",required = false) String gradeId,
            @RequestParam(value = "yearClassId",required = false) String yearClassId,
            @RequestParam(value = "gradeSection",required = false) String gradeSection,
            @RequestParam(value = "classTypeId",required = false) String classTypeId,
            @RequestParam(value = "lessonNum",required = false) String lessonNum,
            @RequestParam(value = "studentName",required = false) String studentName,
            @RequestParam(value = "status",required = false) String status,
            @RequestParam(value = "subjectsId",required = false) String subjectsId);

    /**
     *
     * @return
     */
    @PostMapping("/api/outside/chaPlan/getPassRadeListAdmin")
    public List<MathChaPlan> getPassRadeListAdmin(@RequestBody PassRadeViews passRade);


    @GetMapping("api/outside/chaPlan/getPassRadeDetail")
    public Page<MathChaPlan> getPassRadeDetail(
            @RequestParam(value = "pageNum",defaultValue = "1") Integer pageNum,
            @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
            @RequestParam(value = "schoolIdStr",required = false) String schoolIdStr,
            @RequestParam(value = "yearPart",required = false) String yearPart,
            @RequestParam(value = "quarterNum",required = false) String quarterNum,
            @RequestParam(value = "teacherId",required = false) String teacherId,
            @RequestParam(value = "type",required = false) String type,
            @RequestParam(value = "gradeId",required = false) String gradeId,
            @RequestParam(value = "lessonNumStart",required = false) String lessonNumStart,
            @RequestParam(value = "lessonNum",required = false) String lessonNum,
            @RequestParam(value = "yearClassId",required = false) String yearClassId,
            @RequestParam(value = "classTypeId",required = false) String classTypeId,
            @RequestParam(value = "readingType",required = false) String readingType,
            @RequestParam(value = "readingStatusStr",required = false) String readingStatusStr,
            @RequestParam(value = "isBeforQuarter",required = false) String isBeforQuarter,
            @RequestParam(value = "passType",required = false) String passType,
            @RequestParam(value = "passDate",required = false) String passDate,
            @RequestParam(value = "passDateStart",required = false) String passDateStart,
            @RequestParam(value = "passDateEnd",required = false) String passDateEnd,
            @RequestParam(value = "courseVersionId",required = false) String courseVersionId,
            @RequestParam(value = "subjectsId",required = false) String subjectsId,
            @RequestParam(value = "rightNumStartDate",required = false) String rightNumStartDate,
            @RequestParam(value = "rightNumEndDate",required = false) String rightNumEndDate,
            @RequestParam(value = "studentName",required = false) String studentName);

    @GetMapping("/api/outside/chaPlan/getPassRadeDetailTotal")
    public MathChaPlan getPassRadeDetailTotal(
            @RequestParam(value = "schoolIdStr",required = false) String schoolIdStr,
            @RequestParam(value = "yearPart",required = false) String yearPart,
            @RequestParam(value = "quarterNum",required = false) String quarterNum,
            @RequestParam(value = "teacherId",required = false) String teacherId,
            @RequestParam(value = "type",required = false) String type,
            @RequestParam(value = "gradeId",required = false) String gradeId,
            @RequestParam(value = "lessonNumStart",required = false) String lessonNumStart,
            @RequestParam(value = "lessonNum",required = false) String lessonNum,
            @RequestParam(value = "yearClassId",required = false) String yearClassId,
            @RequestParam(value = "classTypeId",required = false) String classTypeId,
            @RequestParam(value = "readingType",required = false) String readingType,
            @RequestParam(value = "readingStatusStr",required = false) String readingStatusStr,
            @RequestParam(value = "isBeforQuarter",required = false) String isBeforQuarter,
            @RequestParam(value = "passType",required = false) String passType,
            @RequestParam(value = "passDate",required = false) String passDate,
            @RequestParam(value = "passDateStart",required = false) String passDateStart,
            @RequestParam(value = "passDateEnd",required = false) String passDateEnd,
            @RequestParam(value = "courseVersionId",required = false) String courseVersionId,
            @RequestParam(value = "subjectsId",required = false) String subjectsId,
            @RequestParam(value = "rightNumStartDate",required = false) String rightNumStartDate,
            @RequestParam(value = "rightNumEndDate",required = false) String rightNumEndDate,
            @RequestParam(value = "studentName",required = false) String studentName);


    @PostMapping("/api/outside/chaPlan/addChaPlan")
    public boolean addChaPlan(@RequestBody MathChaPlan chaPlan);


    @GetMapping("/api/outside/eduTask/getTaskForNowList")
    public Map<String,Object> getTaskForNowList(@RequestParam("yearPart") String yearPart,
                                                @RequestParam("quarterNum") String quarterNum,
                                                @RequestParam(value = "subjectsId",required = false) String subjectsId);

    //任务表 学习到的课次 最大一条
    @RequestMapping(value = "/api/outside/eduTask/getTaskNumberMax",method= RequestMethod.POST)
    public EduTask getTaskNumberMax(@RequestBody EduTask eduTask);

    @GetMapping("/api/outside/eduTask/getTaskNowMaxLessonNum")
    public Integer getTaskNowMaxLessonNum(@RequestParam(value = "yearPart",required = false,defaultValue = "0") String yearPart,
                                    @RequestParam(value = "quarterNum",required = false,defaultValue = "0") String quarterNum,
                                    @RequestParam(value = "subjectsId",required = false,defaultValue = "0") String subjectsId,
                                    @RequestParam(value = "courseVersionId",required = false,defaultValue = "1676874588501311488") Long courseVersionId,
                                    @RequestParam(value = "categoryId",required = false,defaultValue = "1") Integer categoryId);

}
